<ui:fragment xmlns="http://w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

	<h:form prependId="false" rendered="#{avaliacaoMB.hasUsuarioAutenticado()}">

		<h:outputText value="Avalie este produto" styleClass="font-bold" />
		<p:selectOneRadio value="#{avaliacaoMB.avaliacao.nota}" styleClass="rdo-avaliacao" >
			<f:selectItem itemValue="1" itemLabel="1" />
			<f:selectItem itemValue="2" itemLabel="2" />
			<f:selectItem itemValue="3" itemLabel="3" />
			<f:selectItem itemValue="4" itemLabel="4" />
			<f:selectItem itemValue="5" itemLabel="5" />
			<p:ajax  event="click" listener="#{avaliacaoMB.avaliar(avaliacaoMB.produto, avaliacaoMB.pessoa)}" ></p:ajax>
		</p:selectOneRadio>
		
		<p:commandLink value="Avaliar" rendered="false" actionListener="#{avaliacaoMB.avaliar(avaliacaoMB.produto, avaliacaoMB.pessoa)}" />

	</h:form>
</ui:fragment>